import resAPI from './res'


export default {
  login: params => {
    let data = {
        "menu_tree": [
            {
                "company_id": 1,
                "create_time": "2018-08-17 15:37:17",
                "children": [
                    {
                        "company_id": 1,
                        "create_time": "2018-08-17 15:38:41",
                        "parent_id": 1,
                        "menu_name": "组织架构",
                        "menu_code": "123",
                        "id": 4
                    }
                ],
                "parent_id": 0,
                "menu_name": "通讯录",
                "menu_code": "1221",
                "id": 1
            },
            {
                "company_id": 1,
                "create_time": "2018-08-17 15:37:36",
                "parent_id": 0,
                "menu_name": "活动管理",
                "menu_code": "123",
                "id": 2
            },
            {
                "company_id": 1,
                "create_time": "2018-08-17 15:38:10",
                "parent_id": 0,
                "menu_name": "积分管理",
                "menu_code": "33453",
                "id": 3
            },
            {
                "company_id": 1,
                "create_time": "2018-08-17 15:38:41",
                "parent_id": 1,
                "menu_name": "组织架构",
                "menu_code": "123",
                "id": 4
            }
        ],
        "phone": "17602144316",
        "token_key": "BACKSTAGE_COOKIE_TOKEN",
        "user": {
            "work_num": "001",
            "birthday": "1995-05-23",
            "user_status": 0,
            "reception_islogin": 0,
            "company_id": 1,
            "create_time": "2018-08-14 10:50:20",
            "user_name": "系统管理员",
            "last_login": "2018-08-14 10:50:18",
            "sex": 1,
            "wechat_userid": "",
            "portrait": "",
            "entry_date": "2017-07-19 10:50:08",
            "password": "",
            "phone": "17602144316",
            "role_id": 1,
            "dingtalk_userid": "",
            "id": 1,
            "email": "404988672@qq.com"
        },
        "token": "6000000512426268"
    }
    return resAPI.ok(data)
  },
  token: () => {
    return resAPI.ok({roles:['editor','develop','admin']})
  },
  logout: () => {
    return resAPI.ok();
  }
}
